package com.guigu.controller;

import com.guigu.service.ProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/province/")
public class ProvinceController {
    @Autowired
    ProvinceService provinceService;

    //获取所有的省
    @PostMapping("getAllprovince.action")
    @CrossOrigin
    public List getAllprovince()
    {
        return provinceService.list();
    }
}
